package com.vip.admin.modules.system.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.vip.admin.modules.system.entity.SysRole;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 袜子离不开秋裤
 * @since 2020-01-08
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {

	@Select("select ROLE_CODE from sys_role where ID in (select ROLE_ID from sys_user_role where USER_ID = (select ID from sys_user where USER_NAME=#{username}))")
	List<String> getRoleByUserName(@Param("username") String username);
}
